package com.sitanyun.merchant.guide.frament.presenter.impl;

import com.sitanyun.merchant.guide.frament.model.impl.TodayUserFModelImpl;
import com.sitanyun.merchant.guide.frament.model.inter.ITodayUserFModel;
import com.sitanyun.merchant.guide.frament.presenter.callback.CallBack;
import com.sitanyun.merchant.guide.frament.presenter.inter.ITodayUserFPresenter;
import com.sitanyun.merchant.guide.frament.view.inter.ITodayUserFView;

public class TodayUserFPresenterImpl implements ITodayUserFPresenter {
    private ITodayUserFView mITodayUserFView;
    private ITodayUserFModel mITodayUserFModel;

    public TodayUserFPresenterImpl(ITodayUserFView fITodayUserFView) {
        mITodayUserFView = fITodayUserFView;
        mITodayUserFModel = new TodayUserFModelImpl();
    }

    @Override
    public void gettodayuser( String online, String stars, String orderBy, String havePhone, String interactiveState) {
        mITodayUserFModel.settodayuser( online, stars, orderBy, havePhone, interactiveState, new CallBack() {
            @Override
            public void onSuccess(Object response) {
                mITodayUserFView.response(response,ITodayUserFView.RESPONSE_ONE);
            }

            @Override
            public void onError(Throwable t) {
                mITodayUserFView.response(t,ITodayUserFView.RESPONSE_TWO);
            }
        });
    }
}
